package com.fy.tt.dao;

import com.fy.toolhelper.db.IBaseDao;
import com.fy.tt.entity.Environment;
import com.fy.tt.entity.query.EnvironmentQuery;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

public interface EnvironmentDao extends IBaseDao<Environment> {
    List<Environment> getAllEnvironments(Connection connection) throws SQLException;

    int addEnvironment(Connection connection, Environment environment) throws SQLException;

    int deleteEnvironment(Connection connection, int id) throws SQLException;

    int updateEnvironment(Connection connection, Environment environment) throws SQLException;

    // 分页查询
    List<Environment> getPageEnvironments(Connection connection, int pageSize, int current) throws SQLException;
    // 分页多条件查询
    List<Environment> getConditionPageEnvironments(Connection connection, EnvironmentQuery environmentQuery, int pageSize, int current) throws SQLException;
}